package com.ehome.poct.terminal.api.fegin;


import com.ehome.poct.terminal.api.constant.ApplicationName;
import com.ehome.poct.terminal.api.dto.TestDeviceVersionDTO;
import com.ehome.poct.terminal.api.qry.*;
import com.ehome.poct.terminal.api.vo.NewSoftwareVersionVO;
import com.ehome.poct.terminal.api.vo.NewVersionVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = ApplicationName.POCT_SERVICE_BASE,path = "/test_device_version",contextId = "TestDeviceVersionFeginClient")
public interface TestDeviceVersionFeginClient {

    @GetMapping("/new_version")
    List<NewVersionVO> getNewDriverVersion(@SpringQueryMap CurrentDriverVersionQry qry);

    @GetMapping("/new_version")
    List<NewVersionVO> getNewFirmwareVersion(@SpringQueryMap CurrentFirmwareVersionQry qry);

    @GetMapping("/new_version")
    List<NewSoftwareVersionVO> getNewSoftwareVersion(@SpringQueryMap CurrentDriverVersionQry qry);

    @GetMapping("/new_version")
    List<NewSoftwareVersionVO> getNewSoftwareVersion(@SpringQueryMap CurrentSoftwareVersionQry qry);

    @GetMapping("/new_version")
    List<NewVersionVO> getNewVersion(@SpringQueryMap NewVersionQry qry);

    @GetMapping("/one")
    TestDeviceVersionDTO getUpgradeInfo(@SpringQueryMap UpgradeQry qry);

    @GetMapping("/one")
    TestDeviceVersionDTO getUpgradeInfo(@SpringQueryMap FirmwareUpgradeQry qry);

    @PostMapping("/software_upgrade")
    List<TestDeviceVersionDTO> getSoftwareUpgradeInfo(@RequestBody SoftwareUpgradeQry qry);
}
